<%--
  Created by IntelliJ IDEA.
  User: LY
  Date: 2022/5/27
  Time: 14:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        table{
            border: 1px solid orange;
            width: 1000px;
            margin: 10px auto;
            text-align: center;
            border-collapse: collapse;
        }
        tr{
            border: 1px solid orange;
            height: 50px;
            text-align: center;
        }
        td,th{
            border: 1px solid orange;
        }
        h2{
            text-align: center;
        }
    </style>
</head>
<body>
<h2>人员档案列表</h2>

<a href="addProfile.jsp">添加人员</a>
<br>

<br>
<p>欢迎 【${username}】</p>
<table>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>生日</th>
        <th>性别</th>
        <th>职业</th>
        <th>住所</th>
        <th>电话</th>
        <th>图片</th>
        <th>操作</th>
    </tr>
    <%--    展示域中的数据--%>
    <c:forEach items="${profileList}" var="book">
        <tr>
            <td>${profile.id}</td>
            <td>${profile.name}</td>
            <td>${profile.birthday}</td>
            <td>${profile.gender}</td>
            <td>${profile.career}</td>
            <td>${profile.address}</td>
            <td>${profile.mobile}</td>
            <td>${profile.picture}</td>
                <%--    如果return true，那么会访问 链接，如果返回false，会阻断访问链接        --%>
            <td><a href="updateProfile?profileId=${profile.id}"></a>&nbsp;&nbsp;&nbsp;<a href="select?profileId=${profile.id}">明细</a></td>
        </tr>
    </c:forEach>

</table>
</body>
</html>
